<?php 
namespace app\sgwy\logic;   
use think\Model;

/**
 * Log逻辑定义
 * Class LogLogic
 * @package admin\logic
 */
class NewsLogic extends Model
{
	public $errorMsg=[];   

    /*
     * 获取列表
     */
    public function getList($dataKey = [], $filed = [], $orderby = "status desc,id desc", $page = 1, $pageSize = 5)
    {
        $where = []; 

        if (isset($dataKey['status']))
            $where['status'] = intval($dataKey['status']);
  
        return db('news')->where($where)->field($filed)->order($orderby)->limit(($page - 1) * $pageSize, $pageSize)->select();
    } 
}